import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)
//meta 路由的源数据


const routes = [
  {
    path: '/',
    name: 'user',
    component: ()=>import("../views/homepage/user.vue"),
    meta:{
      isShowNav:true,
      title:"导航",
      isshowtab:true
    }
  },
  {
    path: '/Allpeople',
    name: 'Allpeople',
    component: ()=>import("../views/homepage/Allpeople.vue"),
    meta:{
      isShowNav:true,
      title:"< 全民砍价 ",
      isshowtab:false
    },
   
      

  },
  {
    path: '/swipList',
    name: 'swipList',
    component: ()=>import("../views/homepage/swipList.vue"),
    meta:{
      isShowNav:true,
      title:"详情 ",
      isshowtab:false
    }
  },
  {
    path: '/swiperAll',
    name: 'swiperAll',
    component: ()=>import("../views/homepage/swiperAll.vue"),
    meta:{
      isShowNav:true,
      title:"精选专题 ",
      isshowtab:false
    }
  },
  {
    path: '/home',
    name: 'home',
    component: ()=>import("../views/classification/home.vue"),
    meta:{
      isShowNav:false,
      isshowtab:true
      // title:"分类 "
    }
  },
  {
    path: '/home_details',
    name: 'home_details',
    component: ()=>import("../views/classification/home_details.vue"),
    meta:{
      isShowNav:true,
      isshowtab:false,
      title:"分类 "
    }
  },
  {
    path: '/recommendList',
    name: 'recommendList',
    component: ()=>import("../views/homepage/recommendList.vue"),
    meta:{
      isShowNav:false,
      isshowtab:false,
      title:"人气详情 "
    }
  },
  {
    path: '/login',
    name: 'login',
    component: ()=>import("../views/Login.vue"),
    meta:{
      isShowNav:false,
      isshowtab:false,
      title:"人气详情 "
    }
  },
  {
    path: '/register',
    name: 'register',
    component: ()=>import("../views/register.vue"),
    meta:{
      isShowNav:false,
      isshowtab:false,
      title:"人气详情 "
    }
  },
  {
    path: '/ShopCart',
    name: 'ShopCart',
    component: ()=>import("../views/ShoppingCart/ShopCart.vue"),
    meta:{
      isShowNav:true,
      isshowtab:true,
      title:" 购物车"
    }
  },
  {
    path: '/personal',
    name: 'personal',
    component: ()=>import("../views/personal/personal.vue"),
    meta:{
      isShowNav:false,
      isshowtab:true,
      title:" 购物车"
    }
  },
  {
    path: '/address',
    name: 'address',
    component: ()=>import("../views/personal/address.vue"),
    meta:{
      isShowNav:false,
      isshowtab:false,
      title:" 我的地址"
    }
  },
  {
    path: '/newAddress',
    name: 'newAddress',
    component: ()=>import("../views/personal/newAddress.vue"),
    meta:{
      isShowNav:true,
      isshowtab:false,
      title:" 新建地址"
    }
  }
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  routes
})

export default router
